<template>
<view class="kxzczxert pd">
			<view class="display-flex cxvcxvrtret pm50 pt50" @tap="hf('/pages/userCenter/userInfo')">
				<view class="">

					<image :src="ret.headUrl" class="ucxcxrtreyt" v-if="ret.headUrl"></image>
					<image src="../../static/img/userimg.png" class="ucxcxrtreyt" v-else></image>
				</view>
				<view class="ml20 vertical-center tl flex-1">
					<view class="">
						<view class="fz36 cf">
							{{ret.name||'微信用户'}}
						</view>
						<view class="fz24 cf mt10">
							薪智直聘 天天发薪
						</view>
					</view>
				</view>
			</view>
			
		</view>
	<view class="pd mt20">
		<view class="xcxzcretrexr">
			<view class=" display-flex pd pt20 pm20" @tap="hf('/pages/issue/listOfCompanies')">
				<view class="cxzcrefsxcre  vertical-center">
					<text class=" iconfont icon-gongsi fz40"></text>
				</view>
				<view class="z6 flex-1">
					公司列表
				</view>
				<view class=" vertical-center">
					<text class="iconfont icon-rightyou fz26"></text>
				</view>
			</view>
			<view class=" display-flex pd pt20 pm20 btm" @tap="hf('/pages/issue/listOnly')">
				<view class="cxzcrefsxcre  vertical-center">
					<text class=" iconfont icon-fabudezhiwei fz40"></text>
				</view>
				<view class="z6 flex-1">
					职位列表
				</view>
				<view class=" vertical-center">
					<text class="iconfont icon-rightyou fz26"></text>
				</view>
			</view>
		</view>
	</view>
	<view class="mt20 pd">
		<view class="kxczxcstreszxr pd pt30 pm30">
			<view class="fz32 display-flex pr">
				<view class="flex-1">
					<text class="kkxczxerwt">用户管理</text>
				</view>
			</view>
			<view class="btm mt20 pt20 jxzczxefxcer">

				<view class="cen" @tap="hf('registrationList')">
					<view class="xcxzcvgrxc vertical-center">
						<icon class="iconfont icon-baoming ls fz50"></icon>
					</view>
					<view class="fz24 z9">
						报名管理
					</view>
				</view>
				<view class="cen" @tap="hf('onboardingAudit')">
					<view class="xcxzcvgrxc vertical-center">
						<icon class="iconfont icon-ruzhi-01 ls fz70"></icon>
					</view>
					<view class="fz24 z9">
						入职审核
					</view>
				</view>
				<view class="cen" @tap="hf('salarySheet')">
					<view class="xcxzcvgrxc vertical-center">
						<icon class="iconfont icon-gongzitiao1 ls fz70"></icon>
					</view>
					<view class="fz24 z9">
						工资条管理
					</view>
				</view>
				<view class="cen" @tap="hf('advance')">
					<view class="xcxzcvgrxc vertical-center">
						<icon class="iconfont icon-yuzhi ls fz70"></icon>
					</view>
					<view class="fz24 z9">
						预支薪资审核
					</view>
				</view>


				<view class="cen" @tap="hf('contract')">
					<view class="xcxzcvgrxc vertical-center">
						<icon class="iconfont icon-hetong ls fz70"></icon>
					</view>
					<view class="fz24 z9">
						合同管理
					</view>
				</view>
				<view class="cen" @tap="hf('dimission')">
					<view class="xcxzcvgrxc vertical-center">
						<icon class="iconfont icon-yuangonglizhi ls fz70"></icon>
					</view>
					<view class="fz24 z9">
						离职审核
					</view>
				</view>
			</view>
		</view>
	</view>


</template>
<script lang="ts" setup>
	import { ref } from "vue"
	import { hf, hfer, hfsan, dxrequest, VerifyTheLogin } from "@/util/index.js"
	import { onShow } from "@dcloudio/uni-app"
	const ret = ref({})
	const imxdr = ref(false)
	const getuser = async () => {
		const openid = uni.getStorageSync("openid")
		const { data } = await dxrequest("/api/user/" + openid)
		if (!data.headUrl && !imxdr.value) {
			uni.showModal({
				title: "温馨提示",
				content: "为了给您提供更好的服务，请设置您的头像、昵称信息",
				cancelText: "稍后设置",
				confirmText: "立即设置",
				success({ confirm }) {
					if (confirm) {
						hf("/pages/userCenter/userInfo")
					} else {
						imxdr.value = true
					}
				}
			})
		}
		ret.value = data

	}


	onShow(() => {
		getuser()
	})
	const ixsr = ref()
	const skkfd = () => {
		uni.scanCode({
			success: function (res) {
				console.log('条码类型：' + res.scanType);
				console.log('条码内容：' + res.result);
			}
		});
	}

	const kkcdf = (text) => {
		let kmxcr = text
		if (!text) {
			kmxcr = "正在开发中..."
		}
		uni.showToast({
			icon: "none",
			title: kmxcr
		})
	}
	const jmxcxdfr =()=>{
		try {
			uni.clearStorageSync();
		} catch (e) {
			// error
		}
		uni.switchTab({
			url: '/pages/index/index'
		});
	}

</script>

<style scoped>
	.xcxzcretrexr {
		background: #fff;
		border-radius: 8rpx;
		box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);

	}
	.cxzcrefsxcre{
		width: 80rpx;
	}
</style>